#include "app.h"

static void app_task_start(void *p_arg);

int main()
{
    uint8_t os_err;
    
    OSInit();
    os_err = create_task(app_task_start, "Start Task");
    OSStart();
    return 0;
}

void app_task_start(void *p_arg)
{
    uint8_t os_err;
    (void)p_arg;
    BSP_Init();
    OS_CPU_SysTickInit();
	
#if (OS_TASK_STAT_EN > 0)
    OSStatInit();                                               /* Determine CPU capacity.                              */
#endif
    
    os_err = create_task(app_demo_task, "Demo Task");
	
    while(1)
    {
        io_led_ioctl(LED1, IO_LED_MODE_TOGGLE);
        sleep(10);
        printf("%s: Main task\r\n", __FILE__);
    }	
}

